from ..func.rotate_func import RotateFunctions


def rotate_average(clip, n=1, clock_direction=True, duration=None):
    if duration is None:
        duration = clip.duration
    return clip.rotate(RotateFunctions.average(duration, n, clock_direction))
